package com.cskaoyan.controller.vx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.bo.vxBo.WXAftersaleSubmitBO;
import com.cskaoyan.bean.vo.vxVo.WXAftersaleDetailVO;
import com.cskaoyan.service.vx.WXAftersaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author by WANGJun
 * @date 2022/6/9 17:23
 */
@RestController
@RequestMapping("wx/aftersale")
public class WXAftersaleController {

    @Autowired
    WXAftersaleService wxAftersaleService;

    @RequestMapping("detail")
    public BaseRespVo detail(Integer orderId) {
        WXAftersaleDetailVO wxAftersaleDetailVO = wxAftersaleService.detail(orderId);
        return BaseRespVo.ok(wxAftersaleDetailVO);
    }

    @RequestMapping("submit")
    public BaseRespVo submit(@RequestBody WXAftersaleSubmitBO wxAftersaleSubmitBO) {
        wxAftersaleService.submit(wxAftersaleSubmitBO);
        return BaseRespVo.ok(null);
    }
}
